#pragma once

#include "includeBase.h"
#include "pcl/includePcl.h"

#include "../common/BasePclModel.h"

class RotationalProjectionStatisticsModel : public BasePclModel
{
public:
    RotationalProjectionStatisticsModel();

public:
    static RotationalProjectionStatisticsModel& get();

public: // IJsonSerializable
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    QJsonObject toJson() const override;

public: // Property
    QString pcdFile() const { return pcdFile_; }
    void setPcdFile(const QString& pcdFile) { pcdFile_ = pcdFile; }

    QString indicesFile() const { return indicesFile_; }
    void setIndicesFile(const QString& indicesFile)
    {
        indicesFile_ = indicesFile;
    }

    QString trianglesFile() const { return trianglesFile_; }
    void setTrianglesFile(const QString& trianglesFile)
    {
        trianglesFile_ = trianglesFile;
    }

    float radiusSearch() const { return radiusSearch_; }
    void setRadiusSearch(float radiusSearch) { radiusSearch_ = radiusSearch; }

    float supportRadius() const { return supportRadius_; }
    void setSupportRadius(float supportRadius)
    {
        supportRadius_ = supportRadius;
    }

    unsigned int numberOfPartitionBins() const
    {
        return numberOfPartitionBins_;
    }
    void setNumberOfPartitionBins(unsigned int numberOfPartitionBins)
    {
        numberOfPartitionBins_ = numberOfPartitionBins;
    }

    unsigned int numberOfRotations() const { return numberOfRotations_; }
    void setNumberOfRotations(unsigned int numberOfRotations)
    {
        numberOfRotations_ = numberOfRotations;
    }

private:
    QString pcdFile_ = "<pcl-data>/tutorials/rops_tutorial/points.pcd";
    QString indicesFile_ = "<pcl-data>/tutorials/rops_tutorial/indices.txt)";
    QString trianglesFile_ = "<pcl-data>/tutorials/rops_tutorial/triangles.txt)";

    float radiusSearch_ = 0.0285f;
    float supportRadius_ = 0.0285f;
    int numberOfPartitionBins_ = 5;
    int numberOfRotations_ = 3;
};
